﻿<%@ Page Language="C#" MasterPageFile="~/Calendar/CalenderMasterPage.master" AutoEventWireup="true" Inherits="calendar.day.dayPage" Title="Untitled Page" meta:resourcekey="ML_0000" Codebehind="day.aspx.cs" %>

<%@ Import namespace="calendar.day" %>
<%@ Import namespace="calendar.Configuration" %>
<%@ Import namespace="calendar.Data" %>

<%@Register TagPrefix="calendar" TagName="infopanel" Src="~/Calendar/infopanel.ascx"%>
<%@Register TagPrefix="CC" Namespace="calendar.Controls" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%-- Assembly="OpenSIS"--%>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">



<script language="JavaScript">
function openWin(url) {
        var w_left = Math.ceil(screen.width/2-300);
        var openWin = window.open(url,"VoteWin","left="+w_left+",top=30,scrollbars=no,menubar=no,height=450,width=600,resizable=yes,toolbar=no,location=no,status=no"); 
        openWin.focus();
}
</script>
<script language="JavaScript" type="text/javascript">
//Begin CCS script
//End CCS script
</script>


<asp:UpdatePanel ID="PanelDay" runat="server"><ContentTemplate>


  <asp:Panel ID="panel_AddEvent" Style="display: none" runat="server" CssClass="ModalPopup" Width="450" Height="306">
     <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="modal_header_left bottom_black">&nbsp;</td>
                        <td class="modal_header_bg" valign="top"><div class="modal_header"><asp:Literal ID="ML_0004" runat="server" meta:resourcekey="ML_0004">Add Event</asp:Literal></div></td>
                    </tr>
                    <tr>
                        <td class="modal_rtgrey">&nbsp;</td>
                        <td class="modal_bg">
                            <div style="overflow:auto; overflow-x:hidden; width:390px; height:195px;">
                                                    
                                                                <table width="100%" cellspacing="0" cellpadding="4">
  <tr><td colspan="3">
  
  
   <asp:RadioButtonlist ID="rblEventtypeadd" runat="server" RepeatDirection="Horizontal">
             <asp:ListItem Value="S" Selected="True" meta:resourcekey="Ml_rbltype1">School Day</asp:ListItem>
             <asp:ListItem Value="H" meta:resourcekey="Ml_rbltype2">Holiday</asp:ListItem>
                                            
                                           
                                           </asp:RadioButtonlist>
  
  </td></tr>
  
  
                                                                    <tr>
                                                                        <td class="rcontent">
                                                                            <asp:Literal ID="ML_0005" runat="server" meta:resourcekey="ML_0005">Date</asp:Literal>
                                                                        </td>
                                                                        <td class="colon"><asp:Literal ID="ML_0006" runat="server" meta:resourcekey="ML_0006">:</asp:Literal></td>
                                                                        <td>
                                                                            <asp:Label CssClass="blue_mid" ID="events_recevent_date" maxlength="10" Columns="10" runat="server" meta:resourcekey="events_recevent_date"></asp:Label>
                                                                            <br />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="rcontent">
                                                                            <asp:Literal ID="ML_0008" runat="server" meta:resourcekey="ML_0008">Title *</asp:Literal>
                                                                        </td>
                                                                        <td class="colon"><asp:Literal ID="ML_0009" runat="server" meta:resourcekey="ML_0009">:</asp:Literal></td>
                                                                        <td>
                                                                            <%--<asp:Label ID="events_recevent_titlelbl" runat="server"></asp:Label>--%>
                                                                            <asp:TextBox CssClass="textbox1" ID="events_recevent_titleadd" MaxLength="100" Columns="50" runat="server" meta:resourcekey="events_recevent_titleadd"/>
                                                                         
                                                                          <asp:RequiredFieldValidator ID="rfvTitle" runat="server" ControlToValidate="events_recevent_titleadd" ErrorMessage="<div class='alert' align='left'>Cannot be left blank</div>" Display="Dynamic"
                                                ValidationGroup="vgAdd" meta:resourcekey="rfvTitle"></asp:RequiredFieldValidator>
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="rcontent" valign="top">
                                                                            <asp:Literal ID="ML_0012" runat="server" meta:resourcekey="ML_0012">Notes</asp:Literal>
                                                                        </td>
                                                                        <td class="colon" valign="top"><asp:Literal ID="ML_0013" runat="server" meta:resourcekey="ML_0013">:</asp:Literal></td>
                                                                        <td>
                                                                            <%--<asp:Label ID="events_recevent_desclbl" runat="server"></asp:Label>--%>
                                                                            <asp:TextBox CssClass="textarea" ID="events_recevent_descadd" Rows="5" Columns="50" TextMode="MultiLine"
                                                                                runat="server" meta:resourcekey="events_recevent_descadd"/>
                                                                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="events_recevent_descadd" ErrorMessage="<div class='alert' align='left'>Cannot be left blank</div>" Display="Dynamic"
                                                ValidationGroup="vgAdd" meta:resourcekey="RequiredFieldValidator1"></asp:RequiredFieldValidator>
                                                                                
                                                                            <input id="events_recuser_id" type="hidden" runat="server" />
                                                                            <asp:HiddenField ID="events_recevent_is_public" runat="server" Value="1" />
                                                                        </td>
                                                                    </tr></table>
                                                                    </div>
                                
                                <div class="separator_hor"></div>
                                
                            <table width="100%" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td align="right">
                                                                         
          <asp:Button CssClass="modalbtn_active" ID="events_recButton_Insert" runat="server" Text="Save" OnClick="events_rec_Insert" meta:resourcekey="events_recButton_Insert" validationgroup="vgAdd"/>
         
                                                                           
                                                                          
         
          <asp:Button CssClass="modalbtn_active" ID="events_recButton_Canceladd" runat="server" Text="Cancel" OnClick="events_rec_Cancel" meta:resourcekey="events_recButton_Canceladd" CausesValidation="false" OnClientClick="hidePopup('ctl00_ContentPlaceHolder1_ModalPopupExtender3')"/>
         
                                                                        </td>
                                                                    </tr>
                                                                </table>
                        </td>
                    </tr>
                    </table>
                                                            
                                                </asp:Panel>
               
               <asp:Panel  ID="panel_ViewEdit" Style="display: none" runat="server" CssClass="ModalPopup" Width="450" Height="275">
                  <table width="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="modal_header_left bottom_black">&nbsp;</td>
                        <td class="modal_header_bg" valign="top"><div class="modal_header"><asp:Literal ID="ML_0018" runat="server" meta:resourcekey="ML_0018">View/Edit</asp:Literal></div></td>
                    </tr>
                    <tr>
                        <td class="modal_rtgrey">&nbsp;</td>
                        <td class="modal_bg">
                            <div style="overflow:auto; overflow-x:hidden; width:390px; height:164px;">

                                                                <table cellspacing="0" cellpadding="4">
                                                                
                                                                <tr><td colspan="3">
  
  
   <asp:RadioButtonlist ID="rblEventtypeedit" runat="server" RepeatDirection="Horizontal">
                                            <asp:ListItem Value="S" meta:resourcekey="Ml_rbltype1">School Day</asp:ListItem>
                                            <asp:ListItem Value="H" meta:resourcekey="Ml_rbltype2">Holiday</asp:ListItem>
                        
                                                             
                                           </asp:RadioButtonlist>
  
  </td></tr>
                                                                
                                                                
                                                                
                                                                    <tr>
                                                                        <td class="rcontent">
                                                                            <asp:Literal ID="ML_0019" runat="server" meta:resourcekey="ML_0019">Date</asp:Literal>
                                                                        </td>
                                                                        <td class="colon"><asp:Literal ID="ML_0020" runat="server" meta:resourcekey="ML_0020">:</asp:Literal></td>
                                                                        <td>
                                                                            <asp:Label CssClass="blue_mid" ID="events_recevent_dateview" maxlength="10" Columns="10" runat="server" meta:resourcekey="events_recevent_dateview"></asp:Label>
                                                                            <br />
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="rcontent">
                                                                            <asp:Literal ID="ML_0022" runat="server" meta:resourcekey="ML_0022">Title</asp:Literal><span class="red2"><asp:Literal ID="ML_0034" runat="server" meta:resourcekey="ML_0034">*</asp:Literal></span>
                                                                        </td>
                                                                        <td class="colon"><asp:Literal ID="ML_0035" runat="server" meta:resourcekey="ML_0035">:</asp:Literal></td>
                                                                        <td>
                                                                           <asp:Label CssClass="blue_mid" ID="events_recevent_titlelbl" runat="server" meta:resourcekey="events_recevent_titlelbl"></asp:Label>
                                                                            <asp:TextBox CssClass="textbox1" ID="events_recevent_titleupdt" MaxLength="100" Columns="50" runat="server" Visible="false" meta:resourcekey="events_recevent_titleupdt"/>
                                                                                  <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="events_recevent_titleupdt" ErrorMessage="<div class='alert' align='left'>Cannot be left blank</div>" Display="Dynamic"
                                                ValidationGroup="vgEdit" meta:resourcekey="RequiredFieldValidator2"></asp:RequiredFieldValidator>
                                                                            
                                                                        </td>
                                                                    </tr>
                                                                    <tr>
                                                                        <td class="rcontent" valign="top">
                                                                            <asp:Literal ID="ML_0039" runat="server" meta:resourcekey="ML_0039">Notes</asp:Literal>
                                                                        </td>
                                                                        <td class="colon" valign="top"><asp:Literal ID="ML_0040" runat="server" meta:resourcekey="ML_0040">:</asp:Literal></td>
                                                                        <td>
                                                                            <asp:Label CssClass="blue_mid" ID="events_recevent_desclbl" runat="server" meta:resourcekey="events_recevent_desclbl"></asp:Label>
                                                                            <asp:TextBox CssClass="textarea" ID="events_recevent_descupdt" Rows="5" Columns="50" TextMode="MultiLine"
                                                                                runat="server" Visible="false" meta:resourcekey="events_recevent_descupdt"/>
                                                                                
                                                                                 <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="events_recevent_descupdt" ErrorMessage="<div class='alert' align='left'>Cannot be left blank</div>" Display="Dynamic"
                                                ValidationGroup="vgEdit" meta:resourcekey="RequiredFieldValidator3"></asp:RequiredFieldValidator>
                                                                                
                                                                            <input id="Hidden1" type="hidden" runat="server" />
                                                                            <asp:HiddenField ID="HiddenField1" runat="server" Value="1" />
                                                                        </td>
                                                                    </tr></table></div>
                               <div class="separator_hor"></div>
                            <table width="100%" cellpadding="0" cellspacing="0">
                                                                    <tr>
                                                                        <td align="right">
                                                                           
                                                                            
                                                                         
         
          <asp:Button CssClass="modalbtn_active" ID="events_recButton_Edit" runat="server" Text="Edit" OnClick="events_rec_Edit" meta:resourcekey="events_recButton_Edit" CausesValidation="false"/>
         
         
         
                          
                           <asp:Button CssClass="modalbtn_active" ID="events_recButton_Update" runat="server" Text="Update" OnClick="events_rec_Update" meta:resourcekey="events_recButton_Update" validationgroup="vgEdit" visible="false"/>
                          
                          
                          
                          
                                                                        
                                                                     
                                                                      <asp:Button CssClass="modalbtn_active" ID="events_recButton_Delete" runat="server" Text="Delete" OnClick="events_rec_Delete" OnClientClick="if(!confirm('Are you sure ?')){return false;}" meta:resourcekey="events_recButton_Delete" CausesValidation="false"/>
                                                                     
                                                                     
                                                                     
                                                                         
         
          <asp:Button CssClass="modalbtn_active" ID="btnCancel" runat="server" Text="Cancel" OnClick="events_rec_Cancel" meta:resourcekey="events_recButton_Canceladd" CausesValidation="false" />
         
         
                                                                              
                                                                        </td>
                                                                    </tr>
                                                                </table>
                        </td>
                     </tr>
                  </table>
                                                      
                                                </asp:Panel>

<table cellspacing="5" cellpadding="0" width="100%" border="0">

  <tr>
    <td valign="top" width="20%">
    
    <calendar:infopanel id="infopanel" runat="server"  />
    
    </td> 
    <td style="VERTICAL-ALIGN: top; TEXT-ALIGN: left" valign="top" align="left" width="80%">
      <asp:Literal ID="FullViewEvents" runat="server" meta:resourcekey="FullViewEvents"></asp:Literal>
          <asp:PlaceHolder id="ShortViewEvents" Visible="True" runat="server">
	
      <table cellspacing="0" cellpadding="0" width="100%" border="0">
        <tr>
          <td valign="top">
            
<asp:repeater id="ShortViewEventsGridRepeater" OnItemCommand="ShortViewEventsGridItemCommand" OnItemDataBound="ShortViewEventsGridItemDataBound" runat="server" >
  <HeaderTemplate>
	
            <table class="Header" cellspacing="0" cellpadding="0" border="0">
              <tr>
                <td class="HeaderLeft"><div style="width:17px"></div></td> 
                <th>
                
                
               <%-- <%=Resources.strings.day_events%>--%>
                 <asp:Literal ID="ltrlDayEvents" runat="server" meta:resourcekey="ML_0050">Day Events</asp:Literal>
                
                <asp:Literal ID="ML_0049" runat="server" meta:resourcekey="ML_0049">,</asp:Literal> <asp:Literal ID="ShortViewEventsGridCalendarDate" runat="server" meta:resourcekey="ShortViewEventsGridCalendarDate"></asp:Literal> 
                <asp:Literal ID="ShortViewEventsGridadd_event_spacer" runat="server" meta:resourcekey="ShortViewEventsGridadd_event_spacer"></asp:Literal>
                
                <%--<a id="ShortViewEventsGridadd_event" href="" runat="server"  ><img src="../App_Themes/main/imagescalendar/icon-add-big.gif" border="0"/></a>--%>
               
               
               <%-- added by abhishek 8th june--%>
                <asp:HiddenField ID="hdnDataforEvents" runat="server" />
                <asp:ImageButton ID="ShortViewEventsGridadd_event" runat="server" ImageUrl="../App_Themes/main/styles/Blueprint/Images/AddEvent.png" CommandName="Addition"/>
               
              
   
   <%-- added by abhishek 8th june--%>
               
               
               
                </th>
 
                <td class="HeaderRight"><div style="width:17px"></div></td>
              </tr>
            </table>
 
            <table class="Grid" cellspacing="0" cellpadding="0">
              
  </HeaderTemplate>
  <ItemTemplate>
              <tr class="Row">
                <th width="10%"><b>
                <asp:Literal id="ShortViewEventsGridevent_time" Text='<%# Server.HtmlEncode(((ShortViewEventsGridItem)Container.DataItem).event_time.GetFormattedValue()).Replace("\r","").Replace("\n","<br>") %>' runat="server"/>&nbsp;<asp:Literal id="ShortViewEventsGridevent_time_end" Text='<%# Server.HtmlEncode(((ShortViewEventsGridItem)Container.DataItem).event_time_end.GetFormattedValue()).Replace("\r","").Replace("\n","<br>") %>' runat="server"/></b></th>
 
                <td width="90%">
                  <asp:Image id="ShortViewEventsGridcategory_image"  hspace="3" ImageUrl="~/App_Themes/main/imagescalendar/categories/" vspace="3" runat="server"/>
                
                
               <%-- added by abhishek on 8th june--%>
                 <%-- <a id="ShortViewEventsGridevent_title" href="" runat="server"  ><%#((ShortViewEventsGridItem)Container.DataItem).event_title.GetFormattedValue()%></a> --%>
                  
                  
                  <asp:LinkButton CommandName="View" ID="ShortViewEventsGridevent_title" runat="server" Text='<%#((ShortViewEventsGridItem)Container.DataItem).event_title.GetFormattedValue()%>'></asp:LinkButton>
                                          <asp:HiddenField ID="hdnfldEventNotes" runat="server" Value='<%#((ShortViewEventsGridItem)Container.DataItem).event_notes.GetFormattedValue() %>'/>
                                           <asp:HiddenField ID="hdnfldEventdate" runat="server" Value='' />    
                                         <asp:HiddenField ID="hdnEventId" runat="server" />
                                         <asp:HiddenField ID="hdnEventtype" runat="server" Value='<%#((ShortViewEventsGridItem)Container.DataItem).eventtype.GetFormattedValue() %>'/>
                                        </div>
                                        <%--abhishek 0n 4th june--%>
                                       <cc1:ModalPopupExtender ID="ModalPopupExtender2" runat="server" BackgroundCssClass="Inactive"
                                                    TargetControlID="ShortViewEventsGridevent_title" PopupControlID="panel_ViewEdit" Enabled="false" />
  <%-- added by abhishek on 8th june--%>
                  <asp:Literal id="ShortViewEventsGridcategory_name" Text='<%# Server.HtmlEncode(((ShortViewEventsGridItem)Container.DataItem).category_name.GetFormattedValue()).Replace("\r","").Replace("\n","<br>") %>' runat="server"/></td>
              </tr>
                                
	<asp:PlaceHolder id="IterationContainer" runat="server"/>
  </ItemTemplate>
  <FooterTemplate>
	
  <asp:PlaceHolder id="NoRecords" visible="False" runat="server">
    
              <tr class="NoRecords">
                <td colspan="2">
                
                <asp:Literal ID="Literalnodata" runat="server" meta:resourcekey="ML_0051">There is no data related to this day/event.</asp:Literal>
                
                
                </td>
              </tr>
              
  </asp:PlaceHolder>

            </table>
            
  </FooterTemplate>
</asp:repeater>

            
  <span id="ShortViewEventsNavigatorHolder" runat="server">
    
            

              <table class="Calendar" width="100%" cellspacing="0" cellpadding="0">
                
  <asp:PlaceHolder id="ShortViewEventsNavigatorError" visible="False" runat="server">
  
  </asp:PlaceHolder>
  
                </table>
  
                <div class="CalendarNavigator">    
                    <table>
                      <tr>
                        <td><a id="ShortViewEventsNavigatorprev_day_link" href="" runat="server"  ><%#"<img src=\"../App_Themes/main/styles/" + PageStyleName + "/Images/Prev.png\" border=\"0\"/>"%></a></td> 
                        <td>
                          <select id="ShortViewEventsNavigatordate_day"  runat="server"></select>
 </td> 
                        <td>
                        
                        <%--12thjune--%>
                        <input id='ShortViewEventsNavigatorButtonGo' type="image" src='<%#"../App_Themes/main/styles/" + PageStyleName+"/Images/"+Session["MLUICulture"].ToString()+"-Go.gif"%>' value="<%#Resources.strings.go%>" border="0" OnServerClick='ShortViewEventsNavigator_Cancel' runat="server" meta:resourcekey="ShortViewEventsNavigatorButtonGo"/>
                           
                         <%--<input id='Image1' type="image" src="../App_Themes/main/styles/Blueprint/Images/<%=Session["MLUICulture"].ToString()%>-Go.png" value="<%#Resources.strings.go%>" border="0" OnServerClick='ShortViewEventsNavigator_Cancel' runat="server" meta:resourcekey="ShortViewEventsNavigatorButtonGo"/>--%>
                          
                           <%--12thjune--%>
                          
                          </td> 
                        <td><a id="ShortViewEventsNavigatornext_day_link" href="" runat="server"  ><%#"<img src=\"../App_Themes/main/styles/" + PageStyleName + "/Images/Next.png\" border=\"0\"/>"%></a></td> 
                        <td>&nbsp;&nbsp;</td> 
                        <td>
                          <select id="ShortViewEventsNavigatorweek"  runat="server"></select>
 </td> 
                        <td>
                         <%--12thjune--%>
                          <input id='ShortViewEventsNavigatorButton_DoSearch' type="image" src='<%#"../App_Themes/main/styles/" + PageStyleName+"/Images/"+Session["MLUICulture"].ToString()+"-Go.gif"%>' value="<%#Resources.strings.go%>" border="0" OnServerClick='ShortViewEventsNavigator_Cancel' runat="server"/>
                          
                          
                           <%--12thjune--%>
                          
                          
                          </td> 
                        <td align="right" width="100%"><a id="ShortViewEventsNavigatorYearIcon" href="" runat="server"  ><img src="../App_Themes/main/styles/Blueprint/Images/YearView.png" border="0" /></a>
<a id="ShortViewEventsNavigatorMonthIcon" href="" runat="server"  ><img src="../App_Themes/main/styles/Blueprint/Images/MonthView.png" border="0" /></a><a id="ShortViewEventsNavigatorWeekIcon" href="" runat="server"  ><img src="../App_Themes/main/styles/Blueprint/Images/WeekView.png" border="0" /></a></td>
                      </tr>
                    </table></div>
                  </td>
                </tr>
              </table>
            

            
  </span>
  </td>
        </tr>
      </table>
      
	</asp:PlaceHolder>
	
	</td>
  </tr>
</table>
<p>&nbsp;</p>
<p>&nbsp;</p>


<asp:Panel ID="pnlConfirm" Style="display: none" runat="server" CssClass="ModalPopup"
                Width="292" Height="165">
                 <table cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="alert_ltop"></td>
                        <td style="background-color:#fff; border-top:2px solid #645d5d;">&nbsp;</td>
                        <td class="alert_rtop"></td>
                    </tr>
                    <tr>
                        <td style="background-color:#fff; border-left:2px solid #645d5d;">&nbsp;</td>
                        <td class="alert_modal_bg">
                            <div style="text-align:center; padding:20px 0px 10px 0px; "><asp:Label CssClass="modal_alert" ID="lblConfirm" runat="server"></asp:Label></div>
                            <div class="clear"></div>
                            <div class="separator_hor"></div>
                            <div align="center">
                                 <asp:Button runat="server" ID="btnyes" Text="Yes" OnClick="btnyes_Click" CausesValidation="false" CssClass="modalbtn_active" meta:resourcekey="btnyes"/>
                            <asp:Button runat="server" ID="btnNo" Text="No" OnClick="btnNo_Click" CausesValidation="false" CssClass="modalbtn_active" meta:resourcekey="btnNo"/>
                            </div>                    
                        </td>
                        <td style="background-color:#fff; border-right:2px solid #645d5d;">&nbsp;</td>
                    </tr>
                    <tr>
                        <td class="alert_lbottom"></td>
                        <td style="background-color:#fff; border-bottom:2px solid #645d5d;">&nbsp;</td>
                        <td class="alert_rbottom"></td>
                    </tr>
                </table>
                
                
            </asp:Panel>
            
            <cc1:ModalPopupExtender ID="mdlPopConfirm" runat="server" BackgroundCssClass="Inactive"
                TargetControlID="hdnconfid" PopupControlID="pnlConfirm" />
 <asp:HiddenField ID="hdnconfid" runat="server" />
 
   <asp:HiddenField ID="hdnInsorUpdt" runat="server" />
   
    <cc1:ModalPopupExtender ID="ModalPopupExtender3" runat="server" BackgroundCssClass="Inactive" 
   TargetControlID="hdnadd" PopupControlID="panel_AddEvent" Enabled="false"/>
<asp:HiddenField ID="hdnadd" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:Content>

